<?php
require_once("./libs/ManagerBase.php");
class OAAppManager extends ManagerBase
{
    const OP_ADD = 'add';
    const OP_UPDATE = 'update';
    const OP_DELETE = 'delete';
    protected $OPTypes = array(
        
    );
    
    public function __construct()
    {
        self::loadLibs("OAObserver");
        self::loadLibs("OASObserver");
        $this->addObserver(new OAObserver());
        $this->addObserver(new OASObserver());
    }
    
	public function appInfoSync($appId, $op, $env, $appInfo=null) 
	{
	    $appModel = self::getModelInc("OaAppModel");
		if (!$appInfo) {
			$appInfo = $appModel->getAppInfo($appId);;
		}
		$appInfo['appId'] = $appId;
		$args = array('params'=>$appInfo, 'env'=>$env, 'op'=>$op);
	    $this->onChanged( 'app',  $args, $message);
	}
}